package net.ikenway.springboot.demo.Service.Interface;

import net.ikenway.springboot.demo.Model.Dto.OrderDto;
import net.ikenway.springboot.demo.Model.Entity.Order;

import javax.persistence.EntityNotFoundException;
import java.util.List;

/**
 * @author MasterKenway <zk@ikenway.net>
 * @Description
 * @date Created Date 12/17/2020
 */
public interface OrderServiceIntf {
    public List<OrderDto> findAll();

    public List<OrderDto> findAllByCurrentUser();

    public List<OrderDto> findByStatus(String status) throws Exception;

    public Order create(OrderDto orderDto) throws Throwable;

    public void toPayed(Long orderId) throws Exception;

    public String cancel(Long orderId) throws Exception;

    public void toCancelled(List<Long> orderIds) throws Exception;

    public void finish(List<Long> orderIds) throws Exception;

    public Order exitsOrNot(Long orderId) throws EntityNotFoundException;

}
